<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@  taglib  uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>
<%@  taglib  uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>onlineMsg - 我的短信</title>
    <link rel="stylesheet" href="statics/plugs/layui/css/layui.css">
    <link rel="stylesheet" href="statics/plugs/font-awesome-4.7.0/css/font-awesome.css">
    <link rel="stylesheet" href="statics/css/style.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
     <!--引入头部文件  -->
    <jsp:include page="top.jsp"/>

   	<!-- 引入左侧导航 -->
 	<jsp:include page="left.jsp"/>
 

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">

            <blockquote class="layui-elem-quote">我的短息列表</blockquote>
            <!--平板 pc显示-->
            <table class="layui-table tableList"  lay-skin="line">
                <colgroup>
                    <col width="150">
                    <col width="200">
                    <col>
                </colgroup>
                <thead>
                <tr>
                    <th>序号</th>
                    <th>状态</th>
                    <th>标题</th>
                    <th>时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach  items="${ listMsg}"  var="m"  varStatus="s"  >
	                <tr>
	                    <td>${ ((pageIndex-1)*5+1)+ s.index}</td>
	                    <th id="icon_${m.msgid}">
	                    		
	                            <c:if test="${m.state==0}"><i class="fa fa-envelope" aria-hidden="true"></i></c:if>
	                            <c:if test="${m.state==1}"><i class="fa fa-envelope-open" aria-hidden="true"></i></c:if>
	                    </th>
	                    <th>${m.title}</th>
	                    <td>
	                    	<fmt:formatDate value="${m.msgCreateDate}" pattern="yyyy-MM-dd HH:mm:ss" />
	                    </td>
	                    <td>
	                        <a class="layui-btn layui-btn-xs look" data-id="${m.msgid}">查看</a>
	                        <a  href="send.html?nav=send&username=${m.username}&title=${m.title}" class="layui-btn layui-btn-normal layui-btn-xs reply">回复</a>
	                        <a class="layui-btn layui-btn-danger layui-btn-xs delete" data-id="${m.msgid}">删除</a>
	                    </td>
	                </tr>

				</c:forEach>
                </tbody>
            </table>
            <div id="page"  class="tableList"></div>
			<input  type="hidden"  value="${count}"  id="count">	
			<input  type="hidden"  value="${pageIndex}"  id="pageIndex">	

            <!--手机显示-->
            <c:forEach  items="${ listMsg}"  var="m"  varStatus="s"  >
            <div class="layui-card cardList layui-hide">
                <div class="layui-card-header">
                    序号:${ ((pageIndex-1)*5+1)+ s.index}
                    <span class="layui-layout-right padding-r-5">
                        <a class="layui-btn layui-btn-xs look" data-id="10"><i class="fa fa-search" aria-hidden="true"></i></a>
                        <a href="send.html?nav=send&username=${m.username}&title=${m.title}" class="layui-btn layui-btn-normal layui-btn-xs reply" data-id="10"><i class="fa fa-reply" aria-hidden="true"></i></a>
                        <a class="layui-btn layui-btn-danger layui-btn-xs delete" data-id="10"><i class="fa fa-trash-o" aria-hidden="true"></i></a>
                   </span>
                </div>
                <div class="layui-card-body">
                    信息:${m.title}
                </div>
            </div>
			</c:forEach>

            <div class="layui-card cardList layui-hide " id="page2">
            	<c:if test="${pageIndex<totalPage}">
                	<button class="layui-btn layui-btn-normal layui-btn-fluid">加载更多</button>
                </c:if>
            </div>



        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        ©2019-2099 Mr.king - 版权所有
    </div>
</div>
<script src="statics/plugs/layui/layui.js"></script>
<script src="statics/js/style.js"></script>
</body>
</html>